package com.moioo.exam;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.apache.struts.action.ActionForm;

public class TPoint extends ActionForm implements java.io.Serializable{
	private Long id;
	private String depard;
	private String name;
	private String lession;
	private Date inputDate;
	private Date endDate;
	private Long point;
	private String tel;
	private Integer userId;
	public Integer getUserId() {
		return userId;
	}
	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	public String getUserCode()
	{
		TUser user=new TUserDAO().findById(this.userId);
		if (user==null || user.getCode()==null)return "";
		return user.getCode();
	}
	public TPoint(){
		
	}
	public String getDepard() {
		return depard;
	}
	public void setDepard(String depard) {
		this.depard = depard;
	}
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getInputDateStr(){
		if(inputDate == null)return "";
		return new SimpleDateFormat("yyyy-MM-dd").format(this.inputDate);
	}
	public Date getInputDate() {
		return inputDate;
	}
	public void setInputDate(Date inputDate) {
		this.inputDate = inputDate;
	}
	public String getEndDateStr(){
		if(endDate == null)return "";
		return new SimpleDateFormat("yyyy-MM-dd").format(this.endDate);
	}
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	public String getLession() {
		return lession;
	}
	public void setLession(String lession) {
		this.lession = lession;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Long getPoint() {
		return point;
	}
	public void setPoint(Long point) {
		this.point = point;
	}
	public String getTel() {
		return tel;
	}
	public void setTel(String tel) {
		this.tel = tel;
	}
	
}
